//
//  CABasicAnimation+Extension.swift
//  新浪微博
//
//  Created by Mac on 17/1/3.
//  Copyright © 2017年 itcast. All rights reserved.
//

import UIKit

extension CABasicAnimation {

    convenience init(path:String, fromValue:NSValue, toValue:NSValue, duration:CGFloat, timingFunction:String, autoreverse:Bool, fillModeF:String, repeatCount:Float, removed:Bool) {
        self.init()
        self.keyPath = path
        self.fromValue = fromValue
        self.toValue = toValue
        self.duration = CFTimeInterval(duration)
        self.timingFunction = CAMediaTimingFunction.init(name: timingFunction)
        self.autoreverses = autoreverses
        self.fillMode = fillModeF
        self.repeatCount = repeatCount
        self.isRemovedOnCompletion = removed
    }
}
